import http from "../api/axiosFun.js"

//获取文章
function get()
{
	let url = '/cms/article/get'
	return http.get(url).then(res=>{
		return res
	})
}

//添加文章
function insert(data)
{
	let url = '/cms/article/insert'
	return http.post(url,data).then(res=>{
		return res
	})
}

//更新文章
function update(data)
{
	let url = '/cms/article/update'
	return http.post(url,data).then(res=>{
		return res
	})
}

//删除文章
function del(id)
{
	let url = '/cms/article/del?id='+id
	return http.put_show(url).then(res=>{
		return res
	})
}

export default{
	get,
	insert,
	update,
	del
}